/*******************************************
 * whiteboard.h                            *
 * Written by Brandon Lee and Jacob Talley *
 * Date: 4/15/2011                         *
 *******************************************/

#ifndef whiteboard_h
#define whiteboard_h

#include "WProgram.h"

class Whiteboard
{
  public:
    Whiteboard(int data, int clk, int latch, int notOutputEnable, int demuxA, int demuxB, int demuxC); //Class constructor
    void resetScreen(); //Resets the entire screen to 0
    void dispScreen(); //Displays the current screen on the whiteboard
    void delayScreen(unsigned long int milliSecs); //Acts like the delay()
    void changeSinglePin(int rowCords, int colCords, boolean value); //Change the state of LED at coordinates (rowCords, colCords) to the boolean value
    boolean isLit(int rowCords, int colCords); //Returns if LED at coordinates (rowCords, colCords) is lit
    void charDisp(char letter); //Scrolls a single character on to the screen
    void stringDisp(char string[], int length); //Scrolls a string onto the screen
  private:
    boolean boardMatrix[8][32];
    int _dataPin;
    int _clockPin;
    int _latchPin;
    int _notOEPin;
    int _demuxAPin;
    int _demuxBPin;
    int _demuxCPin;
};


#endif
